package top.stmo.spring.ioc.spring_mybatis;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import top.stmo.spring.ioc.spring_mybatis.config.SpringConfig;
import top.stmo.spring.ioc.spring_mybatis.pojo.Account;
import top.stmo.spring.ioc.spring_mybatis.service.impl.AccountServiceImpl;

import java.util.List;

public class App {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext acac = new AnnotationConfigApplicationContext(SpringConfig.class);
        AccountServiceImpl accountService = acac.getBean(AccountServiceImpl.class);
        List<Account> all = accountService.findAll();
        System.out.println(all);

    }
}
